[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+-------+##################################################################
#+-| INPUT |-----------------------------------------+########################
#| +-------+ The INPUT command displays an optional |########################
#| prompt and then allows for string input |########################
#| which will be assigned to a variable |########################
#+---------------------------------------------------+########################
##############################################################################
##############################################################################
#+--| Syntax |------------------------+#######################################
#| INPUT [<C-exp>] TO <?-var> |#######################################
#+------------------------------------+#######################################
##############################################################################
##############################################################################
####+---| Description |---------------------------------------------------+###
####| INPUT prints a carriage return before the prompt and/or keyboard |###
####| input. Display of the carriage return and optional prompt is |###
####| through the same I/O system as the ? command. If the __cr_first |###
####| flag is set to FALSE then the preceeding carriage return is NOT |###
####| displayed. |###
####| ------------------------------------------------------------------- |###
####| <?-var> cannot be a field variable. If there is an error with the |###
####| user input value, or the user presses the escape key, the original |###
####| value of <?-var> will be maintained. The last key entered by the |###
####| user may be checked through the lastkey() function |###
####| ------------------------------------------------------------------- |###
####| ACCEPT and INPUT use the same line-based keyboard input routine. |###
####| The ACCEPT and INPUT keyboard keys and their meanings are described |###
####| in the ACCEPT INPUT TABLE. |###
####+---------------------------------------------------------------------+###
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Input a numeric variable. |#########
#########| |#########
#########| INPUT "Input value: " TO input_val |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Input a character value @ 10,10 by setting |#########
#########| * __cr_first = .f. |#########
#########| |#########
#########| #INCLUDE data.hdr |#########
#########| |#########
#########| VARDEF |#########
#########| CHAR first_name |#########
#########| ENDDEF |#########
#########| |#########
#########| PROCEDURE force_main |#########
#########| CLEAR |#########
#########| __cr_first = .F. |#########
#########| @ 10,10 |#########
#########| INPUT "Input name" TO first_name |#########
#########| |#########
#########| {...} |#########
#########| |#########
#########| ENDPRO |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
@
@...GET
ACCEPT
ACCEPT INPUT TABLE
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson